All Functions Used So Far, Week 3

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

library

{base}

Load an R package

cut

{base}

Convert Numeric to Factor

mutate

{dplyr}

Modify/create a column in a data frame

ggplot

{GGPLOT2}

Create a ggplot graph

summary

{base}

Obtain summary statistics or detailed regression output

ifelse

{base}

Return a or b depending on the value of test

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

geom_point

{GGPLOT2}

Generates a scatter plot

read_excel

{readxl}

Read an Excel file

c

{base}

Combine values/vectors into a vector

prop.test

{stats}

Test of Equal or Given Proportions

with

{base}

evaluate expression in the context of a data frame

setwd

{base}

Set Working Directory

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

read_dta

{haven}

Read a .dta file (Stata data)

ordered

{dplyr}

Create an ordered factor

The end!